package it.robbocca.backup.manager;

import it.robbocca.backup.exception.ConfigurationException;
import it.robbocca.backup.wifi.parameter.BackupType;

public class BackupManagerHolder {
	public BackupManagerHolder INSTANCE= new BackupManagerHolder();
	private BackupManagerHolder() {

	}
	
	public BackupManager getBackupManager(BackupType tipo) throws ConfigurationException{
		BackupManager manager=null;
		if(tipo==BackupType.FTP){
			manager= new FtpBackupManagerImpl();
		}else if(tipo==BackupType.SMB){
			manager= new SmbBackupManagerImpl();
		}else{
			throw new ConfigurationException("");
		}
		return manager;
	}

}
